const apiBase = 'https://api.it120.cc/luckys'
const Request = (params) => {
  wx.showLoading({
    title: '加载中....',
    mask: true,
  })

  return new Promise((resolve, reject) => {
    wx.request({
      ...params,
      url: apiBase + params.url,
      header: {
        "content-type": 'applocation/x-www-from-urlencoded'
      },
      success: resolve,
      fail: reject,
      complete: wx.hideLoading
    })
  })
}

export {
  Request
}